// main.qml
import QtQuick 6.2
import QtQuick.Controls 6.2
import BilibiliQRCodePoller 1.0
Item {
    width: 600
    height: 400
    BilibiliQRCodePoller{
        id: bilibiliQRCodePoller

    }

    Column {
        spacing: 10

        TextField {
            id: inputField
            placeholderText: qsTr("请输入文本...")
            width: 200
            maximumLength: 30
            onTextChanged: {
                console.log("输入内容已更新:", text)
            }
        }

        Button {
            text: qsTr("获取输入")
            onClicked: {
                console.log("当前输入内容:", inputField.text)
                bilibiliQRCodePoller.sendRequest(inputField.text.toString())
                // 这里可以添加处理输入内容的逻辑
            }
        }
    }
}
